
#include "util/options.h"
#include "net/ethernet.h"

#pragma once

namespace kawauso {

    /**
     * TODO
     */
    class Poller {
    public:
        virtual bool poll() = 0;
    };

    /**
     * TODO
     */
    class Reactor {
        NetworkOptions networkOptions;
        RuntimeOptions runtimeOptions;
        std::vector<Poller *> pollers;
        bool isRunning = true;
    public:
        explicit Reactor(NetworkOptions &networkOptions, RuntimeOptions &runtimeOptions);
        ~Reactor();

        void init();
        void start();
        void stop();
    private:
        void initDPDKEnvironment();
        void registerPollers();
        void runEventLoop();
    public:
        static Reactor global;
    };

}
